Obtains information about the name code of a font instance in a font.
OSStatus ATSUGetFontInstanceNameCode (
ATSUFontID iFont,
ItemCount iInstanceIndex,
FontNameCode *oNameCode);
iFont
A value of type ATSUFontID. Pass the ID of the font whose font instance you want to get name information for.
iFontInstanceIndex
A 0-based index. Pass a value between 0 and one less than the count passed back in the function ATSUCountFontInstances.
oNameCode
A pointer to a value of type FontNameCode. On return, the type of the font instance name. See Font Name Code Constants for a description of possible values. You cannot pass NULL for this parameter.
function result
A result code. The result code kATSUInvalidFontErr indicates that the ID does not correspond to any installed font. The result code kATSUNotSetErr indicates that the font has no name in its name table for the indicated font variation. For a list of other ATSUI-specific result codes, see Result Codes.
DISCUSSION
The ATSUGetFontInstanceNameCode function obtains the name code of an indexed font instance. You can pass this value to the function ATSUFindFontName to find the localized font instance name identified by this name code.